﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DaftarRekomendasiGAGAL.aspx.cs" Inherits="TugasAkhir.DaftarRekomendasiGAGAL" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta charset="utf-8" />
    <title>Daftar Rekomendasi</title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />

    <!-- BOOTSTRAP & FONT AWESOME CSS -->
    <link rel="stylesheet" href="/Assets/css/bootstrap.min.css" />
    <link rel="stylesheet" href="/Assets/css/font-awesome.min.css" />
    
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body style="padding-top:70px">
    <form id="frmRekomendasi" runat="server">
        <!-- ScriptManager -->
        <asp:ScriptManager ID="scriptManager" runat="server" />
        
        <!-- navbar start -->
        <div class="navbar navbar-default navbar-fixed-top" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="/Dosen.aspx">SIAKAD</a>
                </div>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li><a href="/Dosen.aspx">Home</a></li>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigasi <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li id="liPertanyaan" runat="server" hidden="hidden"><a href="/Pertanyaan.aspx">Pertanyaan</a></li>
                                <li id="liPengaturanPertanyaan" runat="server" hidden="hidden"><a href="/PengaturanPertanyaan.aspx">Pengaturan Pertanyaan</a></li>
                                <li id="liRekomendasi" runat="server" hidden="hidden"><a href="/Rekomendasi.aspx">Rekomendasi</a></li>
                                <li id="liDaftarRekomendasi" runat="server" hidden="hidden"><a href="/DaftarRekomendasi.aspx">Daftar Rekomendasi</a></li>
                                <li id="liAnalisis" runat="server" hidden="hidden"><a href="/Analisis.aspx">Analisis</a></li>
                                <li id="liPengaturanRekomendasi" runat="server" hidden="hidden"><a href="/PengaturanRekomendasi.aspx" id="headerMenuRekomendasi" runat="server">Pengaturan Rekomendasi</a></li>
                            </ul>
                        </li>
                        <li class="visible-xs"><a href="/GantiPassword.aspx">Ganti Password</a></li>
                        <li class="visible-xs"><asp:LinkButton runat="server" Text="Logout" OnClick="lnkLogout_Click" /></li>
                    </ul>
                    <ul class="nav navbar-nav pull-right hidden-xs">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown"><asp:Literal ID="litName" runat="server" />&nbsp;<b class="caret"></b></a>
                            <ul class="dropdown-menu pull-right">
                                <li><a href="/GantiPassword.aspx">Ganti Password</a></li>
                                <li class="divider"></li>
                                <li><asp:LinkButton ID="lnkLogout" runat="server" Text="Logout" OnClick="lnkLogout_Click" /></li>                     
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </div><!-- /.navbar -->

        <div class="container">
            <h2>Daftar Rekomendasi</h2>

            <div class="row" style="margin-top:10px">
                <div class="col-sm-10 col-xs-8" style="padding-right:4px">
                    <asp:DropDownList ID="ddlPertanyaanSm" runat="server" CssClass="form-control">
                        <asp:ListItem Text="-- pilih pertanyaan --" Value="" />
                    </asp:DropDownList>
                </div>
                <div class="col-sm-1 col-xs-2" style="padding-right:4px;padding-left:4px">
                    <button type="button" class="btn btn-default btn-block btn-pilih"><i class="fa fa-level-down"></i></button>
                </div>
                <div class="col-sm-1 col-xs-2" style="padding-left:4px">
                    <button id="bt-tambah" type="button" class="btn btn-default btn-block"><i class="fa fa-plus"></i></button>
                </div>
            </div><!-- /.row -->

            <div class="row">
                <asp:UpdatePanel ID="upCrudGrid" runat="server">
                    <ContentTemplate>
                        <div class="col-sm-12">
                            <div id="responsive"></div>
                            <asp:GridView ID="gvRekomendasi" runat="server" CellSpacing="-1" GridLines="None" CssClass="table" AutoGenerateColumns="false" DataKeyNames="id_rekomendasi" AllowPaging="true" PageSize="10" OnRowCommand="gvRekomendasi_RowCommand" OnPageIndexChanging="gvRekomendasi_PageIndexChanging">
                                <Columns>
                                    <asp:TemplateField HeaderStyle-Width="70px" HeaderText="NO">
                                        <ItemTemplate>
                                            <%# Container.DataItemIndex + 1 %>. 
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Right" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="rekomendasi" HeaderText="REKOMENDASI" />
                                    <asp:ButtonField CommandName="updateRecord" Text="<i class='fa fa-pencil'></i>" ButtonType="Link" HeaderStyle-Width="10px" ControlStyle-Font-Underline="false" />
                                    <asp:ButtonField CommandName="deleteRecord" Text="<i class='fa fa-trash-o'></i>" ButtonType="Link" HeaderStyle-Width="10px" ControlStyle-Font-Underline="false" />
                                </Columns>
                                <PagerSettings FirstPageText="First" LastPageText="Last" Mode="NumericFirstLast" PageButtonCount="5" NextPageText="Next" PreviousPageText="Prev" Position="Bottom" />
                                <PagerStyle HorizontalAlign="Center" CssClass="GridPager" />
                            </asp:GridView>
                        </div>
                    </ContentTemplate>
                    <Triggers>

                    </Triggers>
                </asp:UpdatePanel>
            </div>
        </div><!-- /.container -->

        <div id="addModal" class="modal fade">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title"><i class="fa fa-plus"></i> Tambah Rekomendasi</h4>
                    </div>
                    <asp:UpdatePanel ID="upAdd" runat="server">
                        <ContentTemplate>
                            <div class="modal-body">
                                <div class="form-group">
                                    <label for="tbAddRekomendasi">Rekomendasi</label>
                                    <asp:TextBox ID="tbAddRekomendasi" runat="server" TextMode="MultiLine"
                                        CssClass="form-control" style = "resize:none" Rows="3" />
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">Batal</button>
                                <asp:Button ID="btAddRekomendasi" runat="server" Text="Tambah" CssClass="btn btn-primary" OnClick="btAddRekomendasi_Click" />
                            </div>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btAddRekomendasi" EventName="Click" />
                        </Triggers>
                    </asp:UpdatePanel>
                </div> 
            </div>
        </div><!-- /.addModal -->

        <div id="deleteModal" class="modal fade">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title"><span class="glyphicon glyphicon-trash"></span> Hapus Rekomendasi</h4>
                    </div>
                    <asp:UpdatePanel ID="upDelete" runat="server">
                        <ContentTemplate>
                            <div class="modal-body">
                                <p>Anda yakin ingin menghapus rekomendasi ini?</p><asp:HiddenField ID="hfDeleteID" runat="server" />
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">Batal</button>
                                <asp:Button ID="btDeleteRekomendasi" runat="server" Text="Hapus" CssClass="btn btn-primary" OnClick="btDeleteRekomendasi_Click" />
                            </div>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btDeleteRekomendasi" EventName="Click" />
                        </Triggers>
                    </asp:UpdatePanel>
                </div>
            </div>
        </div><!-- /.deleteModal -->

        <div id="editModal" class="modal fade">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title"><span class="glyphicon glyphicon-pencil"></span> Ubah Rekomendasi</h4>
                    </div>
                    <asp:UpdatePanel ID="upEdit" runat="server">
                        <ContentTemplate>
                            <div class="modal-body">
                                <div class="form-group">
                                    <label for="txtEditRekomendasi">Pertanyaan</label>
                                    <asp:TextBox ID="txtEditRekomendasi" runat="server" TextMode="MultiLine"
                                        CssClass="form-control" style="resize:none" Rows="3" />
                                    <asp:HiddenField ID="hfUpdateID" runat="server" />
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">Batal</button>
                                <asp:Button ID="btEditRekomendasi" runat="server" Text="Ubah" CssClass="btn btn-primary" OnClick="btEditRekomendasi_Click" />
                            </div>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btEditRekomendasi" EventName="Click" />
                        </Triggers>
                    </asp:UpdatePanel>
                </div>
            </div>
        </div><!-- /.editModal -->
    </form>

    <!-- JQUERY -->
    <script src="/Assets/js/jquery-1.11.1.min.js"></script>

    <!-- BOOTSTRAP JS -->
    <script src="/Assets/js/bootstrap.min.js"></script>

    <!-- APP JS -->
    <script src="/Assets/js/tugas-akhir/rekomendasi.js"></script>
</body>
</html>
